package com.fnzx.common.enums;

/**
 * @author RenHaiquan
 * @create 2020-10-27 9:02
 * @Description:
 */
public enum  ResponseStatusEnum {

    /**
     * 自定义状态码及其含义
     */
    SERVER_ERROR(-1,"服务器错误"),
    SUCCESS(0,"成功"),
    INVALID_TOKEN(10001, "无效的token"),
    ACTION_UNAUTHORIZED(10002, "操作无权限"),
    RESOURCE_EXIST(10003,"资源已存在"),
    RESOURCE_NOT_FOUND(10004,"资源不存在"),
    AUTHENTICATION_FAILED(10010,"身份认证失败"),
    USER_NOTFOUND(10011,"用户不存在"),
    DUPLICATE_NAME(10012,"用户名已存在"),
    USER_PROHIBIT(10013,"用户被禁用"),
    PHONE_EXIST(10014,"电话号码已存在"),
    MAIL_EXIST(10015,"邮箱已存在"),
    PARAM_ERROR(11001,"参数有误"),
    SCORE_REPEAT(12000,"重复评分");

    private Integer status;

    private String msg;

    ResponseStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }
}
